Page({
  data: {
    sAngle: -Math.PI,
    progress: 20,
    progress2: 0,
    status: [false, false, false, false, false, false]
  },
  setProgress() {
    let num = this.data.progress + 20
    if (num > 100) return;
    this.setData({
      progress: num
    })
  },
  change(e) {
    //半圆 进度 * 2
    this.setData({
      progress2: e.detail.percentage * 2
    })
  },
  switchChange(e) {
    let type = Number(e.currentTarget.dataset.type)
    this.setData({
      [`status[${type-1}]`]: e.detail.value
    })
  },
  circular(){
    wx.navigateTo({
      url: '../circular-progress/circular-progress',
    })
  }
})